<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>maingrade/manage.jsp</title>
</head>
<body>
	<button onclick="window.location.href='add'">新增</button>
	<button onclick="window.location.href='../'">返回首页</button>
	<table border="1" style="width: 500px">
		<caption>所有成績</caption>
		<thead>
			<tr>
				<th>姓名 </th>
				<th>课程</th>
				<th>成绩</th>
				<th colspan="2">操作</th>
			</tr>
		</thead>
		<tbody>
			<c:forEach items="${models }" var="mo">
				<tr>
					<td>${mo.student.name }</td>
					<td>${mo.mainCourse.name }</td>
					<td>${mo.grade }</td>
					<td><a href="edit?id=${mo.id }">修改</a></td>
					<td><a href="delete?id=${mo.id }">删除</a></td>
				</tr>
			</c:forEach>
		</tbody>
	</table>
</body>
</html>